//
//  PurchaseProductCell.h
//  iShop
//
//  Created by svp on 26/12/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@class PurchaseProductCell;

@protocol PurchaseProductCellDelegate<NSObject>

@optional

-(void) textFieldDidBeginEditing:(UITableViewCell*)cell;
-(void) textFieldDidEndEditing:(UITableViewCell*)cell;

@end

@interface PurchaseProductCell : UITableViewCell<UIPickerViewDelegate, UITextFieldDelegate> {
	UITextField *_productField;
	UITextField *_amountField;
	UILabel *_maxAmount;
	UIPickerView *_pickerView;
	NSArray *_pickerArray;
	int _selectedIndex;
	id<PurchaseProductCellDelegate> _delegate;
}

@property(nonatomic, retain) IBOutlet UITextField *productField;
@property(nonatomic, retain) IBOutlet UITextField *amountField;
@property(nonatomic, retain) IBOutlet UILabel *maxAmount;
@property(nonatomic, assign) id<PurchaseProductCellDelegate> delegate;

-(BOOL) initPickerWithArray:(NSArray*) array;

@end
